package org.gd.hellojaxb.privat24.users;

import org.gd.hellojaxb.adapters.DateAdaptersFactory;

import javax.xml.bind.annotation.*;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import java.util.Date;

/**
 * @author user
 */
@XmlRootElement(name = "user")
@XmlAccessorType(XmlAccessType.NONE)
@XmlAccessorOrder(XmlAccessOrder.ALPHABETICAL)
@SuppressWarnings("unused")
public class SUser {

    @XmlElement(name = "id")
    private Integer id;
    @XmlElement(name = "roleid")
    private Integer roleid;
    @XmlElement(name = "login")
    private String login;
    @XmlElement(name = "lang")
    private String lang;
    @XmlElement(name = "pwd")
    private String pwd;
    @XmlElement(name = "lastname")
    private String lname;
    @XmlElement(name = "lname_eng")
    private String lname_eng;
    @XmlElement(name = "middlename")
    private String mname;
    @XmlElement(name = "mname_eng")
    private String mname_eng;
    @XmlElement(name = "firstname")
    private String fname;
    @XmlElement(name = "fname_eng")
    private String fname_eng;
    @XmlElement(name = "sex")
    private String sex;
    @XmlElement(name = "inn")
    private String inn;
    @XmlElement(name = "access")
    private String access;
    @XmlElement(name = "control_info")
    private String control_info;
    @XmlElement(name = "email")
    private String email;
    @XmlElement(name = "birthday")
    @XmlJavaTypeAdapter(DateAdaptersFactory.DateFormat.class)
    private Date bday;
    @XmlElement(name = "moddate")
    @XmlJavaTypeAdapter(DateAdaptersFactory.DateTimeFormat.class)
    private Date datemod;
    @XmlElement(name = "regdate")
    @XmlJavaTypeAdapter(DateAdaptersFactory.DateTimeFormat.class)
    private Date datereg;
    @XmlElement(name = "ip")
    private String ip;
    @XmlElement(name = "sentry_result")
    private String sentry_result;
    @XmlElement(name = "sentry_date")
    @XmlJavaTypeAdapter(DateAdaptersFactory.DateTimeFormat.class)
    private Date sentry_date;
    @XmlElement(name = "status")
    private Integer status;
    @XmlElement(name = "salt")
    private String salt;
    @XmlElement(name = "ldap")
    private String ldap;

    public SUser() {
        this.id = 0;
        this.roleid = 0;
        this.login = "";
        this.lang = "";
        this.pwd = "";
        this.lname = "";
        this.lname_eng = "";
        this.mname = "";
        this.mname_eng = "";
        this.fname = "";
        this.fname_eng = "";
        this.sex = "";
        this.inn = "";
        this.access = "";
        this.control_info = "";
        this.email = "";
        this.bday = new Date();
        this.datemod = new Date();
        this.datereg = new Date();
        this.ip = "";
        this.sentry_result = "";
        this.sentry_date = new Date();
        this.status = 2;
        this.salt = "";
        this.ldap = "";
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getRoleid() {
        return roleid;
    }

    public void setRoleid(Integer roleid) {
        this.roleid = roleid;
    }

    public String getLogin() {
        return login;
    }

    public void setLogin(String login) {
        this.login = login;
    }

    public String getLang() {
        return lang;
    }

    public void setLang(String lang) {
        this.lang = lang;
    }

    public String getPwd() {
        return pwd;
    }

    public void setPwd(String pwd) {
        this.pwd = pwd;
    }

    public String getLname() {
        return lname;
    }

    public void setLname(String lname) {
        this.lname = lname;
    }

    public String getLname_eng() {
        return lname_eng;
    }

    public void setLname_eng(String lname_eng) {
        this.lname_eng = lname_eng;
    }

    public String getMname() {
        return mname;
    }

    public void setMname(String mname) {
        this.mname = mname;
    }

    public String getMname_eng() {
        return mname_eng;
    }

    public void setMname_eng(String mname_eng) {
        this.mname_eng = mname_eng;
    }

    public String getFname() {
        return fname;
    }

    public void setFname(String fname) {
        this.fname = fname;
    }

    public String getFname_eng() {
        return fname_eng;
    }

    public void setFname_eng(String fname_eng) {
        this.fname_eng = fname_eng;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public String getInn() {
        return inn;
    }

    public void setInn(String inn) {
        this.inn = inn;
    }

    public String getAccess() {
        return access;
    }

    public void setAccess(String access) {
        this.access = access;
    }

    public String getControl_info() {
        return control_info;
    }

    public void setControl_info(String control_info) {
        this.control_info = control_info;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public Date getBday() {
        return bday;
    }

    public void setBday(Date bday) {
        this.bday = bday;
    }

    public Date getDatemod() {
        return datemod;
    }

    public void setDatemod(Date datemod) {
        this.datemod = datemod;
    }

    public Date getDatereg() {
        return datereg;
    }

    public void setDatereg(Date datereg) {
        this.datereg = datereg;
    }

    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    public String getSentry_result() {
        return sentry_result;
    }

    public void setSentry_result(String sentry_result) {
        this.sentry_result = sentry_result;
    }

    public Date getSentry_date() {
        return sentry_date;
    }

    public void setSentry_date(Date sentry_date) {
        this.sentry_date = sentry_date;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getSalt() {
        return salt;
    }

    public void setSalt(String salt) {
        this.salt = salt;
    }

    public String getLdap() {
        return ldap;
    }

    public void setLdap(String ldap) {
        this.ldap = ldap;
    }
}
